package 算法.手动输入数据练习;

import java.util.Scanner;

/**
 * @author coderFu
 * @create 2022/3/16
 * 含退出的输入
 */
public class CoderNumBreak {

    public static void main(String[] args) {



        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int p = sc.nextInt();
            if ( p == 0){
                break;
            }
            int sum = 0;
            for (int i = 0; i < p; i++) {
                int a = sc.nextInt();
                 sum = sum+a;
            }
            System.out.println(sum);
        }
    }
}
